home *** CD-ROM | disk | FTP | other *** search
/ Chip 2002 January / 01_02.iso / bonus / matrix / Install Matrix Screen Saver.exe / Install Matrix Screen Saver.dcr / 00014.ls < prev    next >
Encoding:
Text File  |  1999-01-26  |  1.6 KB  |  60 lines

  1. global gforegndlocHList, gMouseH, gMouseV, speedlist, speedlistOld
  2.  
  3. on startMovie
  4.   clearGlobals()
  5.   gMouseH = the mouseH
  6.   gMouseV = the mouseV
  7.   set the keyDownScript to "quit"
  8.   set the mouseDownScript to "quit"
  9.   cursor(200)
  10.   set the member of sprite 100 to member(16)
  11.   repeat with x = 100 down to 1
  12.     set the locV of sprite x to random(1100)
  13.   end repeat
  14.   gforegndlocHList = [0, 20, 40, 60, 80, 100, 120, 140, 160, 180, 200, 220, 240, 260, 280, 300, 320, 340, 360, 380, 400, 420, 440, 460, 480, 500, 520, 540, 560, 580, 600, 620, 640, 660, 680, 700, 720, 740, 760, 780, 800]
  15.   speedlist = []
  16.   speedlistOld = []
  17.   repeat with i = 1 to 85
  18.     kjlfdghjkldfgjkhldfgskjhlsdfghj = random(40) + 6
  19.     add(speedlist, kjlfdghjkldfgjkhldfgskjhlsdfghj)
  20.   end repeat
  21.   speedlistOld = duplicate(speedlist)
  22.   put speedlist
  23. end
  24.  
  25. on stripeAnimation
  26.   repeat with i = 85 down to 1
  27.     spriteiSpeed = getAt(speedlist, i)
  28.     if the locV of sprite i < 1100 then
  29.       set the locV of sprite i to the locV of sprite i + spriteiSpeed
  30.       next repeat
  31.     end if
  32.     set the locV of sprite i to -400
  33.     glocHpicked = getAt(gforegndlocHList, random(count(gforegndlocHList)))
  34.     set the locH of sprite i to glocHpicked
  35.   end repeat
  36. end
  37.  
  38. on glitch
  39.   if random(40) > 39 then
  40.     set the member of sprite 100 to member("glitch loop anim")
  41.     h = random(480) + 100
  42.     v = random(400) + 50
  43.     set the loc of sprite 100 to point(h, v)
  44.   else
  45.     if random(40) > 39 then
  46.       set the member of sprite 100 to member(16)
  47.     end if
  48.   end if
  49. end
  50.  
  51. on stopMovie
  52.   cursor(-1)
  53. end
  54.  
  55. on enterFrame
  56.   if (the mouseH <> gMouseH) or (the mouseV <> gMouseV) then
  57.     quit()
  58.   end if
  59. end
  60.